package vip

// RelationType
const (
	FlagTrue                = 1
	FlagFalse               = 0
	LicenseCodeActionReset  = 1
	LicenseCodeActionRevoke = 2
)
const (
	RelationTypeUser   uint = 10 // 用户
	RelationTypeDevice uint = 20 // 设备
	RelationTypeGroup  uint = 30 // 群组
)

// VipType

const (
	VipTypeQuota  uint = 10 // quota 配额
	VipTypePeriod uint = 20 // expired_at 有效期
	VipTypeCandy  uint = 30 // quota+expired_at 有效期次数
	VipTypeLimit  uint = 40 // quota+expired_at 有效期限制
	VipTypeTodo   uint = 50 // quota+expired_at 自定义
)

// LogType

const (
	LogTypeDefault uint = 0 // 未知

	LogTypePurchase  uint = 10 // 购买
	LogTypeUpgrade   uint = 11 // 升级
	LogTypeDowngrade uint = 12 // 降级
	LogTypeRenew     uint = 13 // 续费
	LogTypeBundled   uint = 14 // 附赠-购买

	LogTypeRefund         uint = 20 // 退款
	LogTypeRefundPlatform uint = 21 // 退款-平台
	LogTypeRefundUnified  uint = 22 // 退款-支付网关
	LogTypeRefundInternal uint = 23 // 退款内部

	LogTypeCode           uint = 30 // 激活码
	LogTypeCodeActivate   uint = 31 // 激活码激活
	LogTypeCodeRevoke     uint = 32 // 激活码吊销
	LogTypeCodePurchase   uint = 33 // 购买
	LogTypeCodeEcommerce  uint = 34 // 电商
	LogTypeCodePopularize uint = 35 // 推广

	LogTypeActivity          uint = 40 // 活动
	LogTypeActivityRegister  uint = 41 // 注册
	LogTypeActivityPurchase  uint = 42 // 购买
	LogTypeActivityAdvertise uint = 43 // 广告
	LogTypeActivityInviter   uint = 44 // 分享
	LogTypeActivityInvitee   uint = 45 // 被分享

	LogTypeMigrate       uint = 50 // 迁移
	LogTypeMigrateAuto   uint = 51 // 迁移-自动
	LogTypeMigrateManual uint = 52 // 迁移-手动
	LogTypeMigratePo     uint = 53 // 迁移-PO
	LogTypeMigrateUser   uint = 54 // 迁移-用户

	LogTypeInternal        uint = 60 // 内部
	LogTypeInternalStore   uint = 61 // 创建
	LogTypeInternalUpdate  uint = 62 // 修改
	LogTypeInternalDestroy uint = 63 // 删除

	LogTypeDeduct        uint = 70 // 扣减
	LogTypeDeductPo      uint = 71 // 扣减-PO
	LogTypeDeductProduct uint = 72 // 扣减-终端
)

// LicenseType

const (
	LicenseTypeFree         uint = 0   // 免费
	LicenseTypeLite         uint = 10  // 轻量
	LicenseTypeBasic        uint = 20  // 基础
	LicenseTypePremium      uint = 110 // 优质
	LicenseTypeAdvanced     uint = 120 // 高级
	LicenseTypeProfessional uint = 210 // 专业
	LicenseTypeSuper        uint = 220 // 超级
)

// PeriodType

const (
	PeriodTypeTrial     uint = 0  // 试用
	PeriodTypeDaily     uint = 10 // 包日
	PeriodTypeWeekly    uint = 20 // 包周
	PeriodTypeMonthly   uint = 30 // 包月
	PeriodTypeQuarterly uint = 40 // 包季
	PeriodTypeYearly    uint = 50 // 包年
	PeriodTypeDecade    uint = 60 // 包十年
)

// StatusType

const (
	StatusTypeUnknown  uint = 0
	StatusTypeNormal   uint = 1
	StatusTypeUsed     uint = 2
	StatusTypeRefunded uint = 3
	StatusTypeDeleted  uint = 4
)
